<?php
/*
 * Created on 2013-6-15
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
require_once("../../base/Db.php");
$db = new Db;
$sql = "select *from template";
$res = $db->getRsArray($sql);
?>
<div class="right2_tt" align="left">
	<table>

	   <tr style="background:#FFB109;"><td>序号/编号</td><td>模板名称</td><td>模板产品分类</td><td>模板浏览次数</td><td>下载次数</td><td>上传时间</td><td>详情</td><td>修改</td><td>删除</td></tr>
	  <?php
	   for($i=0;$i<count($res);$i++){
		$id = $res[$i]['id'];
		$baby_name = $res[$i]['baby_name'];
		$baby_product_cate = $res[$i]['baby_product_cate'];
		$baby_color_cate = $res[$i]['baby_color_cate'];
		$baby_template_cate = $res[$i]['baby_template_cate'];
		$baby_snap = $res[$i]['baby_snap'];
		$baby_desc = $res[$i]['baby_desc'];
	 ?>
	   <tr><td><?php echo $id ?></td><td><?php echo $baby_name?></td><td><?php echo $baby_product_cate?></td><td>12</td><td>12</td><td>2013-5-3</td><td>查看详情</td><td><a babyId="<?php echo $id ?>" href="#" onclick="updateBaby(this);">修改</a></td><td><a babyId="<?php echo $id ?>" href="#" onclick="deleteBaby(this);">删除</a></td></tr>
	 <?php
	 	}
	 ?>
	</table>
</div>
